﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:Hextris="clr-namespace:Hextris">

	<!-- Theme -->
	<LinearGradientBrush x:Key="ThemeBackgroundBrush" StartPoint="0.5,1" EndPoint="0.5,0">
		<GradientStop Color="#FF8496AA" Offset="0" />
		<GradientStop Color="#FF2B3138" Offset="1" />
	</LinearGradientBrush>
	<SolidColorBrush x:Key="ThemeForegroundBrush" Color="Black" />
	<!--<Style TargetType="themingToolkit:Theme">
		<Setter Property="Background" Value="{StaticResource ThemeBackgroundBrush}" />
		<Setter Property="Foreground" Value="{StaticResource ThemeForegroundBrush}" />
	</Style>
	<Style TargetType="shinyBlue:ShinyBlueTheme">
		<Setter Property="Background" Value="{StaticResource ThemeBackgroundBrush}" />
		<Setter Property="Foreground" Value="{StaticResource ThemeForegroundBrush}" />
	</Style>-->

	<!--ValidationTooltipTemplate-->
	<ControlTemplate x:Key="ValidationToolTipTemplate">
		<Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
			<VisualStateManager.VisualStateGroups>
				<VisualStateGroup x:Name="OpenStates">
					<VisualStateGroup.Transitions>
						<VisualTransition GeneratedDuration="0"/>
						<VisualTransition GeneratedDuration="0:0:0.2" To="Open">
							<Storyboard>
								<DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
									<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
								</DoubleAnimationUsingKeyFrames>
								<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
									<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
								</DoubleAnimationUsingKeyFrames>
							</Storyboard>
						</VisualTransition>
					</VisualStateGroup.Transitions>
					<VisualState x:Name="Closed">
						<Storyboard>
							<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
								<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
					<VisualState x:Name="Open">
						<Storyboard>
							<DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
								<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
							</DoubleAnimationUsingKeyFrames>
							<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
								<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</VisualState>
				</VisualStateGroup>
			</VisualStateManager.VisualStateGroups>
			<Grid.RenderTransform>
				<TranslateTransform x:Name="xform" X="-25"/>
			</Grid.RenderTransform>
			<Border Margin="4,4,-4,-4" Background="#152A2E31" CornerRadius="4"/>
			<Border Margin="3,3,-3,-3" Background="#252A2E31" CornerRadius="4"/>
			<Border Margin="2,2,-2,-2" Background="#352A2E31" CornerRadius="4"/>
			<Border Margin="1,1,-1,-1" Background="#452A2E31" CornerRadius="4"/>
			<Border Background="#FFDC000C" CornerRadius="4"/>
			<Border CornerRadius="4">
				<Border.Background>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#66FFFFFF"/>
						<GradientStop Color="#66000000" Offset="1"/>
						<GradientStop Color="#00E5E5E5" Offset="0.1"/>
						<GradientStop Color="#00161616" Offset="0.9"/>
					</LinearGradientBrush>
				</Border.Background>
				<TextBlock Margin="8,3,8,4" MaxWidth="250" UseLayoutRounding="false" Foreground="White" Text="{Binding Path=(Validation.Errors)[0].ErrorContent}" TextWrapping="Wrap"/>
			</Border>
		</Grid>
	</ControlTemplate>


	<!--SHINY BLUE-->
	<Color x:Key="TextBrush">#FF000000</Color>

	<Color x:Key="NormalBrushGradient1">#FFBAE4FF</Color>
	<Color x:Key="NormalBrushGradient2">#FF398FDF</Color>
	<Color x:Key="NormalBrushGradient3">#FF006DD4</Color>
	<Color x:Key="NormalBrushGradient4">#FF0A3E69</Color>

	<Color x:Key="NormalBorderBrushGradient1">#FFBBBBBB</Color>
	<Color x:Key="NormalBorderBrushGradient2">#FF737373</Color>
	<Color x:Key="NormalBorderBrushGradient3">#FF646464</Color>
	<Color x:Key="NormalBorderBrushGradient4">#FF000000</Color>

	<Color x:Key="SelectedBackgroundGradient1">#FFBBBBBB</Color>
	<Color x:Key="SelectedBackgroundGradient2">#FF737373</Color>
	<Color x:Key="SelectedBackgroundGradient3">#FF646464</Color>
	<Color x:Key="SelectedBackgroundGradient4">#FFA1A1A1</Color>

	<Color x:Key="SliderBorderGradient1">#FF3F3F3F</Color>
	<Color x:Key="SliderBorderGradient2">#FFADADAD</Color>

	<Color x:Key="ShadeBrushGradient1">#FF62676A</Color>
	<Color x:Key="ShadeBrushGradient2">#FFD1D4D6</Color>
	<Color x:Key="ShadeBrushGradient3">#FFFFFFFF</Color>

	<Color x:Key="WindowBackgroundBrushGradient1">#FFD1D1D1</Color>
	<Color x:Key="WindowBackgroundBrushGradient2">#FF8496AA</Color>


	<LinearGradientBrush x:Key="NormalBrush"
					   EndPoint="0.5,1"
					   StartPoint="0.5,0">
		<GradientStop Color="{StaticResource NormalBrushGradient1}"
				  Offset="0" />
		<GradientStop Color="{StaticResource NormalBrushGradient2}"
				  Offset="0.41800001263618469" />
		<GradientStop Color="{StaticResource NormalBrushGradient3}"
				  Offset="0.418" />
		<GradientStop Color="{StaticResource NormalBrushGradient4}"
				  Offset="1" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="NormalBorderBrush"
					   EndPoint="0.5,1"
					   StartPoint="0.5,0">
		<GradientStop Color="{StaticResource NormalBorderBrushGradient1}" />
		<GradientStop Color="{StaticResource NormalBorderBrushGradient2}"
				  Offset="0.38" />
		<GradientStop Color="{StaticResource NormalBorderBrushGradient3}"
				  Offset="0.384" />
		<GradientStop Color="{StaticResource NormalBorderBrushGradient4}"
				  Offset="1" />
	</LinearGradientBrush>

	<RadialGradientBrush x:Key="HoverBrush">
		<RadialGradientBrush.RelativeTransform>
			<TransformGroup>
				<ScaleTransform CenterX="0.5"
						CenterY="0.5"
						ScaleX="1.804"
						ScaleY="0.743" />
				<SkewTransform CenterX="0.5"
					   CenterY="0.5" />
				<RotateTransform CenterX="0.5"
						 CenterY="0.5" />
				<TranslateTransform Y="0.47999998927116394" />
			</TransformGroup>
		</RadialGradientBrush.RelativeTransform>
		<GradientStop Color="#FF98DAFF"
				  Offset="0.209" />
		<GradientStop Color="#0098DAFF"
				  Offset="1" />
		<GradientStop Color="#FFFFFFFF"
				  Offset="0" />
	</RadialGradientBrush>

	<LinearGradientBrush x:Key="CheckIconBrush"
					   EndPoint="0.5,1"
					   StartPoint="0.5,0">
		<GradientStop Color="#FF006CD1" />
		<GradientStop Color="#FFA5D6F9"
				  Offset="1" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="ShadeBrush"
					   EndPoint="0.5,1"
					   StartPoint="0.5,0">
		<GradientStop Color="{StaticResource ShadeBrushGradient2}"
				  Offset="0" />
		<GradientStop Color="{StaticResource ShadeBrushGradient3}"
				  Offset="0.1" />
		<GradientStop Color="{StaticResource ShadeBrushGradient3}"
				  Offset="1" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="ShadeBrushTop"
					   EndPoint="0.5,1"
					   StartPoint="0.5,0">
		<GradientStop Color="{StaticResource ShadeBrushGradient2}"
				  Offset="0" />
		<GradientStop Color="{StaticResource ShadeBrushGradient3}"
				  Offset="0.1" />
		<GradientStop Color="{StaticResource ShadeBrushGradient3}"
				  Offset="1" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="ShadeBrushBottom"
					   EndPoint="0.5,0"
					   StartPoint="0.5,1">
		<GradientStop Color="{StaticResource ShadeBrushGradient2}" />
		<GradientStop Color="{StaticResource ShadeBrushGradient3}"
				  Offset="0.1" />
		<GradientStop Color="{StaticResource ShadeBrushGradient3}"
				  Offset="1" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="ShadeBrushLeft"
					   EndPoint="1,0.5"
					   StartPoint="0,0.5">
		<GradientStop Color="{StaticResource ShadeBrushGradient2}" />
		<GradientStop Color="{StaticResource ShadeBrushGradient3}"
				  Offset="0.1" />
		<GradientStop Color="{StaticResource ShadeBrushGradient3}"
				  Offset="1" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="ShadeBrushRight"
					   EndPoint="0,0.5"
					   StartPoint="1,0.5">
		<GradientStop Color="{StaticResource ShadeBrushGradient2}" />
		<GradientStop Color="{StaticResource ShadeBrushGradient3}"
				  Offset="0.1" />
		<GradientStop Color="{StaticResource ShadeBrushGradient3}"
				  Offset="1" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="DisabledBackgroundBrush"
					   EndPoint="0.5,1"
					   StartPoint="0.5,0">
		<GradientStop Color="#FFFFFFFF" />
		<GradientStop Color="#FF62676A"
				  Offset="1" />
		<GradientStop Color="#FFD1D4D6"
				  Offset="0.41800001263618469" />
		<GradientStop Color="#FFA9AFB5"
				  Offset="0.425" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="SelectedBackgroundBrush"
					   EndPoint="0.5,1"
					   StartPoint="0.5,0">
		<GradientStop Color="{StaticResource SelectedBackgroundGradient1}" />
		<GradientStop Color="{StaticResource SelectedBackgroundGradient2}"
				  Offset="0.38" />
		<GradientStop Color="{StaticResource SelectedBackgroundGradient3}"
				  Offset="0.384" />
		<GradientStop Color="{StaticResource SelectedBackgroundGradient4}"
				  Offset="1" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="SelectedBackgroundBrushVertical"
					   EndPoint="2.05,0.5"
					   StartPoint="-0.55,0.5">
		<GradientStop Color="{StaticResource SelectedBackgroundGradient1}" />
		<GradientStop Color="{StaticResource SelectedBackgroundGradient2}"
				  Offset="0.37999999523162842" />
		<GradientStop Color="{StaticResource SelectedBackgroundGradient3}"
				  Offset="0.38400000333786011" />
		<GradientStop Color="{StaticResource SelectedBackgroundGradient4}"
				  Offset="1" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="HorizontalSliderBorderBrush"
					   EndPoint="0.5,1"
					   StartPoint="0.5,0">
		<GradientStop Color="{StaticResource SliderBorderGradient1}" />
		<GradientStop Color="{StaticResource SliderBorderGradient2}"
				  Offset="1" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="VerticalSliderBorderBrush"
					   EndPoint="1.35,0.5"
					   StartPoint="0.6,0.5">
		<GradientStop Color="{StaticResource SliderBorderGradient1}" />
		<GradientStop Color="{StaticResource SliderBorderGradient2}"
				  Offset="1" />
	</LinearGradientBrush>

	<LinearGradientBrush x:Key="WindowBackgroundBrush"
					   EndPoint="0.5,1"
					   StartPoint="0.5,0">
		<GradientStop Color="{StaticResource WindowBackgroundBrushGradient1}" />
		<GradientStop Color="{StaticResource WindowBackgroundBrushGradient2}"
				  Offset="1" />
	</LinearGradientBrush>

	<!--RepeatButton-->
	<Style TargetType="RepeatButton"  x:Key="ShinyBlueRepeat">
		<Setter Property="Background"
			Value="{StaticResource NormalBrush}"/>
		<Setter Property="Foreground"
			Value="#FFFFFFFF"/>
		<Setter Property="Padding"
			Value="3"/>
		<Setter Property="BorderThickness"
			Value="2"/>
		<Setter Property="BorderBrush"
			Value="{StaticResource NormalBorderBrush}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="RepeatButton">
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualStateGroup.Transitions>
									<VisualTransition GeneratedDuration="00:00:00.1"
										To="MouseOver"/>
									<VisualTransition GeneratedDuration="00:00:00.1"
										To="Pressed"/>
									<VisualTransition From="Normal"
										GeneratedDuration="00:00:00.3000000"
										To="MouseOver"/>
									<VisualTransition From="MouseOver"
										GeneratedDuration="00:00:00.5000000"
										To="Normal"/>
									<VisualTransition From="Pressed"
										GeneratedDuration="00:00:00.5000000"
										To="MouseOver"/>
								</VisualStateGroup.Transitions>
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Hover"
												   Storyboard.TargetProperty="Opacity">
											<SplineDoubleKeyFrame KeyTime="0"
											Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
												   Duration="00:00:00.0010000"
												   Storyboard.TargetName="Background"
												   Storyboard.TargetProperty="(UIElement.Opacity)">
											<SplineDoubleKeyFrame KeyTime="00:00:00"
											Value="0.7"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
												   Storyboard.TargetProperty="(UIElement.Opacity)">
											<SplineDoubleKeyFrame KeyTime="0"
											Value="0.65"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualStateGroup.Transitions>
									<VisualTransition From="Focused"
										GeneratedDuration="00:00:00.5000000"
										To="Unfocused"/>
									<VisualTransition From="Unfocused"
										GeneratedDuration="00:00:00.3000000"
										To="Focused"/>
								</VisualStateGroup.Transitions>
								<VisualState x:Name="Focused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Duration="0"
												   Storyboard.TargetName="FocusVisualElement"
												   Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0"
											  Value="Visible" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="Background"
					Background="{TemplateBinding Background}"
					BorderBrush="{TemplateBinding BorderBrush}"
					BorderThickness="{TemplateBinding BorderThickness}"
					CornerRadius="2,2,2,2">
							<Border x:Name="Hover"
					  Background="{StaticResource HoverBrush}"
					  CornerRadius="2,2,2,2"
					  Height="Auto"
					  Width="Auto"
					  Opacity="0"/>
						</Border>
						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
							  Margin="{TemplateBinding Padding}"
							  x:Name="contentPresenter"
							  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
							  Content="{TemplateBinding Content}"
							  ContentTemplate="{TemplateBinding ContentTemplate}"/>
						<Border x:Name="DisabledVisualElement"
					IsHitTestVisible="false"
					Opacity="0"
					Background="{StaticResource DisabledBackgroundBrush}"
					CornerRadius="2,2,2,2"/>
						<Border x:Name="FocusVisualElement"
					IsHitTestVisible="false"
					Visibility="Collapsed"
					BorderBrush="{StaticResource HoverBrush}"
					BorderThickness="2,2,2,2"
					CornerRadius="2,2,2,2"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--Button-->
	<Style TargetType="Button"  x:Key="ShinyBlue">
		<Setter Property="Background"
			Value="{StaticResource NormalBrush}"/>
		<Setter Property="Foreground"
			Value="#FFFFFFFF"/>
		<Setter Property="Padding"
			Value="3"/>
		<Setter Property="BorderThickness"
			Value="2"/>
		<Setter Property="BorderBrush"
			Value="{StaticResource NormalBorderBrush}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualStateGroup.Transitions>
									<VisualTransition GeneratedDuration="00:00:00.1"
										To="MouseOver"/>
									<VisualTransition GeneratedDuration="00:00:00.1"
										To="Pressed"/>
									<VisualTransition From="Normal"
										GeneratedDuration="00:00:00.3000000"
										To="MouseOver"/>
									<VisualTransition From="MouseOver"
										GeneratedDuration="00:00:00.5000000"
										To="Normal"/>
									<VisualTransition From="Pressed"
										GeneratedDuration="00:00:00.5000000"
										To="MouseOver"/>
								</VisualStateGroup.Transitions>
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Hover"
												   Storyboard.TargetProperty="Opacity">
											<SplineDoubleKeyFrame KeyTime="0"
											Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
												   Duration="00:00:00.0010000"
												   Storyboard.TargetName="Background"
												   Storyboard.TargetProperty="(UIElement.Opacity)">
											<SplineDoubleKeyFrame KeyTime="00:00:00"
											Value="0.7"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
												   Storyboard.TargetProperty="(UIElement.Opacity)">
											<SplineDoubleKeyFrame KeyTime="0"
											Value="0.65"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualStateGroup.Transitions>
									<VisualTransition From="Focused"
										GeneratedDuration="00:00:00.5000000"
										To="Unfocused"/>
									<VisualTransition From="Unfocused"
										GeneratedDuration="00:00:00.3000000"
										To="Focused"/>
								</VisualStateGroup.Transitions>
								<VisualState x:Name="Focused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Duration="0"
												   Storyboard.TargetName="FocusVisualElement"
												   Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0"
											  Value="Visible" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="Background"
					Background="{TemplateBinding Background}"
					BorderBrush="{TemplateBinding BorderBrush}"
					BorderThickness="{TemplateBinding BorderThickness}"
					CornerRadius="2,2,2,2">
							<Border x:Name="Hover"
					  Background="{StaticResource HoverBrush}"
					  CornerRadius="2,2,2,2"
					  Height="Auto"
					  Width="Auto"
					  Opacity="0"/>
						</Border>
						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
							  Margin="{TemplateBinding Padding}"
							  x:Name="contentPresenter"
							  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
							  Content="{TemplateBinding Content}"
							  ContentTemplate="{TemplateBinding ContentTemplate}"/>
						<Border x:Name="DisabledVisualElement"
					IsHitTestVisible="false"
					Opacity="0"
					Background="{StaticResource DisabledBackgroundBrush}"
					CornerRadius="2,2,2,2"/>
						<Border x:Name="FocusVisualElement"
					IsHitTestVisible="false"
					Visibility="Collapsed"
					BorderBrush="{StaticResource HoverBrush}"
					BorderThickness="2,2,2,2"
					CornerRadius="2,2,2,2"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>